<?php
include "connection.php";

$kecamatan=$_GET['kecamatan'];

$result=mysql_query("SELECT * FROM pk14_pinter_location where KECAMATAN='" . $kecamatan . "'");

while ($row = mysql_fetch_object($result)) 
		{
			
			$arr[]=array("id"=>$row->id,"kabupaten"=>$row->KABUPATEN,"kecamatan"=>$row->KECAMATAN,"desa"=>$row->DESA);
		}
		$response=array("items"=>$arr);
		$final=array("response"=>$response);
		echo json_encode($final);
?>